﻿using System;
using System.Collections;
using System.Collections.Generic;
using BLL.RF.Package;
using Model.RF.Package;

public partial class ViewbyProduct_ViewPackage_View2SNPackageData_View2SNUnionandPackageData : System.Web.UI.Page
{
    private SNUnion u;
    private Package p;
    private string sn
    {
        get { return ViewState["SN"].ToString(); }
        set { ViewState["SN"] = value; }
    }

    public ViewbyProduct_ViewPackage_View2SNPackageData_View2SNUnionandPackageData()
    {
        u = new SNUnion();
        p = new Package();
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        sn = this.TextBox1.Text.Trim();
        BindSNUnionGV();
        BindPackageGV();
    }

    protected void BindSNUnionGV()
    {
        this.GridView1.DataSource = u.SNUnion_GetbyPackageProductSN(sn);
        this.GridView1.DataBind();
    }

    protected void BindPackageGV()
    {
        IList<PackageInfo> list = new List<PackageInfo>();
        list.Add(p.LoadEntity(sn));
        this.GridView2.DataSource = list;
        this.GridView2.DataBind();
    }
}
